<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('操作日志详细')" />
	<th:block th:include="include :: jsonview-css" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m-t" id="signupForm">
		<div class="form-group">
			<label class="col-sm-2 control-label">账号appKey：</label>
			<div class="form-control-static" th:text="${record.appKey}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">请求来源：</label>
			<div class="form-control-static" th:text="${record.requestIp}+ ' / ' + ${record.requestLocation}+ ' / ' + ${record.requestMethod}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">api名称：</label>
			<div class="form-control-static" th:text="${record.apiName}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">api后缀：</label>
			<div class="form-control-static" th:text="${record.apiUrl}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">请求地址：</label>
			<div class="form-control-static" th:text="${record.requestUrl}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">转发地址：</label>
			<div class="form-control-static" th:text="${record.forwardUrl}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">转发服务器名称：</label>
			<div class="form-control-static" th:text="${record.serverName}">
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">请求参数：</label>
			<div class="form-control-static"><pre id="requestParams"></pre></div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">转发状态(与请求结果无关)：</label>
			<div class="form-control-static" th:class="${record.forwardSuccess ? 'label label-primary' : 'label label-danger'}" th:text="${record.forwardSuccess ? '正常' : '异常'}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">转发用时：</label>
			<div class="form-control-static" th:text="${record.useTime}+'ms'">
			</div>
		</div>
		<div class="form-group" th:style="'display:' + ${record.forwardSuccess ? 'block' : 'none'}">
			<label class="col-sm-2 control-label">响应数据结构：</label>
			<div class="form-control-static" th:text="${record.responseContentType}">
			</div>
		</div>
		<div class="form-group" th:style="'display:' + ${record.forwardSuccess ? 'none' : 'block'}">
			<label class="col-sm-2 control-label">异常信息：</label>
			<div class="form-control-static" th:text="${record.failedReasons}">
			</div>
		</div>
	</form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: jsonview-js" />
    <script th:inline="javascript">
	    $(function() {
	    	var json = [[${record.requestParams}]];
	    	if ($.common.isNotEmpty(json) && json.length < 2000) {
	    		$("#requestParams").JSONView(json);
	    	} else {
	    		$("#requestParams").text(json);
	    	}
	    });
    </script>
</body>
</html>